package com.lds.memory.kafka.util;

import com.lds.memory.kafka.enums.IErrorEnum;
import com.lds.memory.kafka.exception.MemoryKafkaException;

public final class AssertUtils {
    private AssertUtils() {
    }

    public static void assertTrue(boolean condition, String errorMessage) {
        if (!condition) {
            throw new MemoryKafkaException(errorMessage);
        }
    }

    public static void assertTrue(boolean condition, IErrorEnum errorEnum) {
        if (!condition) {
            throw new MemoryKafkaException(errorEnum.getErrorMessage());
        }
    }

}
